// request 接口相关
let path = "http://127.0.0.1:8081"
if (process.env.NODE_ENV !== "development") {
	path = "http://127.0.0.1:8081"
}

export { path }

export const successCode = 0 // 成功的code
export const tokenVarName = "Authorization" // 携带token的变量名
export const tokenPosition = "header" // token的携带位置
export const replayUrl = "/app/auth/refreshJwt" //

// 软件系统
export const systemInfo = (() => uni.getSystemInfoSync())()

// i18
export const language = ["Chinese"]

// 软件版本
export const versionNum = "v1.0.0"

// 微信JS-SDK相关
export const wxConfig = {
	appid: "",
	jsApiList: [
		"updateAppMessageShareData", // 分享给朋友
		"updateTimelineShareData", // 分享到朋友圈
	],
}
export const wxAppid = "wx27bcd45aeddcc4d9"

export default {
	install(Vue) {
		uni.isDev = process.env.NODE_ENV === "development"

		Vue.prototype.path = path

		Vue.prototype.isApp = false
		Vue.prototype.isMp = false
		Vue.prototype.isH5 = false

		// #ifdef APP-PLUS
		Vue.prototype.isApp = true
		// #endif
		// #ifdef MP
		Vue.prototype.isMp = true
		// #endif
		// #ifdef H5
		Vue.prototype.isH5 = true
		// #endif
	},
}
